package star.cloud.asme.base.fowable.baseInterface;

import com.baomidou.mybatisplus.core.metadata.IPage;
import star.cloud.asme.base.dto.Result;

import java.util.List;

public interface FlowableBaseService<Q extends FlowableBaseQueryCondition, R extends FlowableBaseEntity> {

    default Result<R> getOneByCondition(String key, Object value) {
        return null;
    }

    default Result<R> getOneByConditions(Q condition) {
        return null;
    }

    default Result<List<R>> getListByCondition(String key, Object value) {
        return null;
    }

    default Result<List<R>> getListByConditions(Q condition) {
        return null;
    }

    default Result<IPage<R>> getListByConditionsWithPage(Q condition) {
        return null;
    }

    default Result<?> logicalDeleteById(String id) {
        return null;
    }

    default Result<?> physicalDeleteById(String id) {
        return null;
    }
}
